package com.jie.service;

import com.jie.dao.DelDao;
import com.jie.mapper.FileMapper;
import com.jie.show.FileInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DelService {

    @Autowired
    FileMapper fileMapper;
    @Autowired
    private DelDao delDao;

    public boolean deleteUser(Integer id) throws Exception {
        if (delDao.delete(id) > 0) {
            return true;
        } else {
            return false;
        }
    }

    public boolean deletes(Integer id) {
        boolean del = fileMapper.deletes(id) > 0;
        if (del){
            return true;
        }else {
            return false;
        }
    }
}
